<!DOCTYPE HTML>
<html>
<head>
<script>
	window.onload = function(){
		var canvas = document.getElementById("myCanvas");
		var context = canvas.getContext("2d");
		
		var startX = 85;
		var startY = 70;
		var zigzagSpacing = 60;
		
		context.lineWidth = 10;
		context.strokeStyle = "#0096ff";
		
		context.beginPath();
		context.moveTo(startX, startY);
		for (var n = 0; n < 7; n++)
		{
			var x = startX + (n+1) * zigzagSpacing;
			var y;
			if (n%2)
			{
				y = startY;
			}
			else
			{
				y = startY + 100;
			}
			context.lineTo(x, y);
		}
		context.stroke();
	}
</script>
</head>
<body>
	<canvas id="myCanvas" width="600" height="240" style="border:1px solid black;">
	</canvas>
</body>
</html>